home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / editors / tscredd2 / scrdisk5.exe / arc / SCRDEMO.C < prev    next >
Text File  |  1990-05-11  |  31KB  |  1,136 lines

  1. /*
  2. Before trying to compile and run this program, read and follow Part II of
  3. Turbo ScrEdit Tutor (stored in the file ScrEdit.Tut.)
  4. */
  5.  
  6. #include <alloc.h>
  7. #include <stdio.h>
  8. #include <conio.h>
  9. #include <string.h>
  10. #include <ctype.h>
  11. #include <process.h>
  12. #include <errno.h>
  13. #include "scredit.h"
  14.  
  15. /*
  16. Remember to use Turbo ScrEdit to compile the screens in ScrDemo.Scr before you
  17. try to compile and run this program. See Turbo ScrEdit Tutor for instructions.
  18. */
  19.  
  20. #include "SCRDEMO.001"
  21. #include "SCRDEMO.002"
  22. #include "SCRDEMO.003"
  23. #include "SCRDEMO.004"
  24. #include "SCRDEMO.005"
  25.  
  26. int Result,
  27.     Tr,Tc,Br,Bc,
  28.     Option,
  29.     Screen_Mode,
  30.     Cursor_Position;
  31.  
  32. char Name[35],
  33.      Address_a[35],
  34.      Address_b[35],
  35.      City[21],
  36.      State[3],
  37.      ZipCode[10],
  38.      Phone[15],
  39.      Ssn[12];
  40. double Gross;
  41.  
  42.  
  43.  
  44. /*****************************
  45.  
  46. MENU OPTION 1 (Example data entry screen)
  47.  
  48. Section 2 of Turbo ScrEdit Tutor Describes this portion of code
  49.  
  50. *****************************/
  51.  
  52.  
  53. void RecordDemo_Init()
  54. {
  55. Initialize_Dupe_Fields_buf();
  56. Initialize_Mouse_Demo_buf();
  57. Name[0]=0;
  58. Address_a[0]=0;
  59. Address_b[0]=0;
  60. City[0]=0;
  61. State[0]=0;
  62. ZipCode[0]=0;
  63. Phone[0]=0;
  64. Ssn[0]=0;
  65. Gross=0;
  66. S_Msg[0]     = 0;
  67. S_Point      = -1;
  68. S_EnterAsTab = 0;
  69. S_LoadScreen("Dupe_Fields");
  70. S_ClearScreen(1);
  71. }
  72.  
  73.  
  74.  
  75. char *MakeMsg(int mode, int Bg, int Fg)
  76. {
  77. char colorwork[3],workstr[85];
  78. switch (mode)
  79.   {
  80.   case 1 :
  81.    {
  82.    strcpy(workstr," Change colors of ERROR messages from VALIDATE procedures Bg(");
  83.    break;
  84.    }
  85.   case 2 :
  86.    {
  87.    strcpy(workstr," Change Colors of HELP messages accessed by auto help or '?' Bg(");
  88.    break;
  89.    }
  90.   case 3 :
  91.    {
  92.    strcpy(workstr," Specify the color attributes for you customer messages Bg (");
  93.    break;
  94.    }
  95.   }
  96. itoa(Bg,colorwork,10);
  97. strcat(workstr,colorwork);
  98. strcat(workstr,") Fg(");
  99. itoa(Fg,colorwork,10);
  100. strcat(workstr,colorwork);
  101. strcat(workstr,")");
  102. workstr[79]=0;
  103. return (char *)&workstr;
  104. }
  105.  
  106. void EnterRecords()
  107. {
  108. if (S_EnterAsTab)
  109.   strcpy(Dupe_Fields_buf.Key," F10 ");
  110. else
  111.   strcpy(Dupe_Fields_buf.Key,"Enter");
  112.  
  113. S_ReadScreen();
  114.  
  115. if ((S_Ctrl)&&((S_Ch=='A')||(S_Ch=='a')))
  116.   {
  117.   switch (S_Cursor)
  118.      {
  119.      case S_OFF
  120.        : {S_Cursor=S_BOLD;break;}
  121.      case S_BOLD
  122.        : {S_Cursor=S_NORMAL;break;}
  123.      case S_NORMAL
  124.        : {S_Cursor=S_INVERSENORMAL;break;}
  125.      case S_INVERSENORMAL
  126.        : {S_Cursor=S_INVERSEBOLD;break;}
  127.      default :
  128.          S_Cursor=S_OFF;
  129.      }
  130.   }
  131.  
  132.  
  133. while ((S_Home)||(S_End)||(S_Up)||(S_Down)||(S_PgUp)||(S_PgDn))
  134.   {
  135.   if  ((S_Home)||(S_End))
  136.     strcpy(S_ErrorMsg,MakeMsg(1,(int)S_ErrorBg,(int)S_ErrorFg));
  137.   if  ((S_Up)||(S_Down))
  138.     strcpy(S_AutoHelpMsg,MakeMsg(2,(int)S_HelpBg,(int)S_HelpFg));
  139.   if  ((S_PgUp)||(S_PgDn))
  140.     strcpy(S_UserMsg,MakeMsg(3,(int)S_UserBg,(int)S_UserFg));
  141.  
  142.   S_ReadKey();
  143.  
  144.   if  ((S_Home)||(S_End))
  145.     {
  146.     if  (S_Home) S_ErrorBg++;
  147.     if  (S_End)  S_ErrorFg++;
  148.     if  (S_ErrorBg > 7)  S_ErrorBg = 0;
  149.     if  (S_ErrorFg > 15) S_ErrorFg = 0;
  150.     }
  151.   if  ((S_Up)||(S_Down))
  152.     {
  153.     if  (S_Up) S_HelpBg++;
  154.     if  (S_Down)  S_HelpFg++;
  155.     if  (S_HelpBg > 7)  S_HelpBg = 0;
  156.     if  (S_HelpFg > 15) S_HelpFg = 0;
  157.     }
  158.   if  ((S_PgUp)||(S_PgDn))
  159.     {
  160.     if  (S_PgUp) S_UserBg++;
  161.     if  (S_PgDn)  S_UserFg++;
  162.     if  (S_UserBg > 7)  S_UserBg = 0;
  163.     if  (S_UserFg > 15) S_UserFg = 0;
  164.     }
  165.   }
  166.  
  167.  
  168. if  (S_F1)
  169.     {
  170.     if (!S_IsDupe(S_PrevField))
  171.         {
  172.         S_SetDupe(S_PrevField-1);
  173.         S_SetDupe(S_PrevField+1);
  174.         S_SetDupe(S_PrevField);
  175.         if (S_IsDupe(S_PrevField))
  176.            switch (S_PrevField)
  177.              {
  178.              case 11 : {strcpy(Dupe_Fields_buf.a,"[");
  179.                         strcpy(Dupe_Fields_buf.r,"]");break;}
  180.              case 14 : {strcpy(Dupe_Fields_buf.b,"[");
  181.                         strcpy(Dupe_Fields_buf.s,"]");break;}
  182.              case 17 : {strcpy(Dupe_Fields_buf.c,"[");
  183.                         strcpy(Dupe_Fields_buf.t,"]");break;}
  184.              case 20 : {strcpy(Dupe_Fields_buf.d,"[");
  185.                         strcpy(Dupe_Fields_buf.u,"]");break;}
  186.              case 23 : {strcpy(Dupe_Fields_buf.e,"[");
  187.                         strcpy(Dupe_Fields_buf.v,"]");break;}
  188.              case 26 : {strcpy(Dupe_Fields_buf.f,"[");
  189.                         strcpy(Dupe_Fields_buf.w,"]");break;}
  190.              case 29 : {strcpy(Dupe_Fields_buf.g,"[");
  191.                         strcpy(Dupe_Fields_buf.x,"]");break;}
  192.              case 32 : {strcpy(Dupe_Fields_buf.h,"[");
  193.                         strcpy(Dupe_Fields_buf.y,"]");break;}
  194.              case 35 : {strcpy(Dupe_Fields_buf.i,"[");
  195.                         strcpy(Dupe_Fields_buf.z,"]");break;}
  196.              }
  197.         }
  198.     else
  199.         {
  200.         S_ReSetDupe(S_PrevField-1);
  201.         S_ReSetDupe(S_PrevField+1);
  202.         S_ReSetDupe(S_PrevField);
  203.         if (!S_IsDupe(S_PrevField))
  204.            switch (S_PrevField)
  205.              {
  206.              case 11 : {Dupe_Fields_buf.a[0]=0;Dupe_Fields_buf.r[0]=0;break;}
  207.              case 14 : {Dupe_Fields_buf.b[0]=0;Dupe_Fields_buf.s[0]=0;break;}
  208.              case 17 : {Dupe_Fields_buf.c[0]=0;Dupe_Fields_buf.t[0]=0;break;}
  209.              case 20 : {Dupe_Fields_buf.d[0]=0;Dupe_Fields_buf.u[0]=0;break;}
  210.              case 23 : {Dupe_Fields_buf.e[0]=0;Dupe_Fields_buf.v[0]=0;break;}
  211.              case 26 : {Dupe_Fields_buf.f[0]=0;Dupe_Fields_buf.w[0]=0;break;}
  212.              case 29 : {Dupe_Fields_buf.g[0]=0;Dupe_Fields_buf.x[0]=0;break;}
  213.              case 32 : {Dupe_Fields_buf.h[0]=0;Dupe_Fields_buf.y[0]=0;break;}
  214.              case 35 : {Dupe_Fields_buf.i[0]=0;Dupe_Fields_buf.z[0]=0;break;}
  215.              }
  216.         }
  217.     }
  218.  
  219. if  (S_F2)
  220.     {
  221.     S_ClearDupes();
  222.     setmem(Dupe_Fields_buf.a,2,0);
  223.     setmem(Dupe_Fields_buf.b,2,0);
  224.     setmem(Dupe_Fields_buf.c,2,0);
  225.     setmem(Dupe_Fields_buf.d,2,0);
  226.     setmem(Dupe_Fields_buf.e,2,0);
  227.     setmem(Dupe_Fields_buf.f,2,0);
  228.     setmem(Dupe_Fields_buf.g,2,0);
  229.     setmem(Dupe_Fields_buf.h,2,0);
  230.     setmem(Dupe_Fields_buf.i,2,0);
  231.     setmem(Dupe_Fields_buf.r,2,0);
  232.     setmem(Dupe_Fields_buf.s,2,0);
  233.     setmem(Dupe_Fields_buf.t,2,0);
  234.     setmem(Dupe_Fields_buf.u,2,0);
  235.     setmem(Dupe_Fields_buf.v,2,0);
  236.     setmem(Dupe_Fields_buf.w,2,0);
  237.     setmem(Dupe_Fields_buf.x,2,0);
  238.     setmem(Dupe_Fields_buf.y,2,0);
  239.     setmem(Dupe_Fields_buf.z,2,0);
  240.     }
  241.  
  242. if  (S_F3)
  243.     {
  244.     if  (S_HelpSound==1)
  245.       {
  246.       S_HelpSound =0;
  247.       S_ErrorSound=0;
  248.       S_UserSound =0;
  249.       }
  250.     else
  251.       {
  252.       S_HelpSound =1;
  253.       S_ErrorSound=1;
  254.       S_UserSound =1;
  255.       }
  256.     }
  257.  
  258. if  (S_F4)
  259.     S_AutoHelp = (S_AutoHelp==1)? 0:1;
  260.  
  261. if  (S_F5)
  262.     S_AutoValidate = (S_AutoValidate==1)? 0:1;
  263.  
  264. if  (S_F6)
  265.     if  (Dupe_Fields_buf.Name1[0]>0)
  266.       {
  267.       strcpy(Dupe_Fields_buf.Name2,Dupe_Fields_buf.Name1);
  268.       strcpy(Dupe_Fields_buf.Address2_a,Dupe_Fields_buf.Address1_a);
  269.       strcpy(Dupe_Fields_buf.Address2_b,Dupe_Fields_buf.Address1_b);
  270.       strcpy(Dupe_Fields_buf.City2,Dupe_Fields_buf.City1);
  271.       strcpy(Dupe_Fields_buf.S2,Dupe_Fields_buf.S1);
  272.       strcpy(Dupe_Fields_buf.Zip2,Dupe_Fields_buf.Zip1);
  273.       strcpy(Dupe_Fields_buf.Phone2,Dupe_Fields_buf.Phone1);
  274.       strcpy(Dupe_Fields_buf.Ssn2,Dupe_Fields_buf.Ssn1);
  275.       Dupe_Fields_buf.Gross2=Dupe_Fields_buf.Gross1;
  276.       setmem(Dupe_Fields_buf.Name1,35,0);
  277.       setmem(Dupe_Fields_buf.Address1_a,35,0);
  278.       setmem(Dupe_Fields_buf.Address1_b,35,0);
  279.       setmem(Dupe_Fields_buf.City1,21,0);
  280.       setmem(Dupe_Fields_buf.S1,3,0);
  281.       setmem(Dupe_Fields_buf.Zip1,10,0);
  282.       setmem(Dupe_Fields_buf.Phone1,15,0);
  283.       setmem(Dupe_Fields_buf.Ssn1,12,0);
  284.       Dupe_Fields_buf.Gross1 = 0;
  285.       S_Point = 8;
  286.       }
  287.     else
  288.       strcpy(S_UserMsg," No record entered to Edit..");
  289.  
  290. if  (S_F9)
  291.     S_EnterAsTab = (S_EnterAsTab) ? 0:1;
  292.  
  293. if  ((S_EnterAsTab)&&(S_F10))
  294.     {
  295.     S_ScreenValid = 1;
  296.     S_ValidateScreen();
  297.     if (!S_ScreenValid) S_ResetKeyFlags();
  298.     }
  299. if  (((!S_EnterAsTab)&&(S_Enter))||((S_EnterAsTab)&&(S_F10)))
  300.     {
  301.     strcpy(Name,Dupe_Fields_buf.Name2);
  302.     strcpy(Address_a,Dupe_Fields_buf.Address2_a);
  303.     strcpy(Address_b,Dupe_Fields_buf.Address2_b);
  304.     strcpy(City,Dupe_Fields_buf.City2);
  305.     strcpy(State,Dupe_Fields_buf.S2);
  306.     strcpy(ZipCode,Dupe_Fields_buf.Zip2);
  307.     strcpy(Phone,Dupe_Fields_buf.Phone2);
  308.     strcpy(Ssn,Dupe_Fields_buf.Ssn2);
  309.     Gross=Dupe_Fields_buf.Gross2;
  310.     S_ClearScreen(1);
  311.     strcpy(Dupe_Fields_buf.Name1,Name);
  312.     strcpy(Dupe_Fields_buf.Address1_a,Address_a);
  313.     strcpy(Dupe_Fields_buf.Address1_b,Address_b);
  314.     strcpy(Dupe_Fields_buf.City1,City);
  315.     strcpy(Dupe_Fields_buf.S1,State);
  316.     strcpy(Dupe_Fields_buf.Zip1,ZipCode);
  317.     strcpy(Dupe_Fields_buf.Phone1,Phone);
  318.     strcpy(Dupe_Fields_buf.Ssn1,Ssn);
  319.     Dupe_Fields_buf.Gross1=Gross;
  320.     S_Point = 8;
  321.     }
  322. }
  323.  
  324.  
  325.  
  326.  
  327. void RecordDemo()
  328. {
  329. RecordDemo_Init();
  330. while (!S_Esc)
  331.     {
  332.     EnterRecords();
  333.     }
  334. S_EnterAsTab = 0;
  335. S_AutoHelp   = 0;
  336. S_ErrorSound = 1;
  337. S_HelpSound  = 1;
  338. S_UserSound  = 1;
  339. S_SetDisplayOff(1);
  340. S_ClearDupes();
  341. setmem(Dupe_Fields_buf.v,2,0);
  342. setmem(Dupe_Fields_buf.w,2,0);
  343. setmem(Dupe_Fields_buf.x,2,0);
  344. setmem(Dupe_Fields_buf.y,2,0);
  345. setmem(Dupe_Fields_buf.z,2,0);
  346. setmem(Dupe_Fields_buf.a,2,0);
  347. }
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361. /*****************************
  362.  
  363. MENU OPTION 2 (Demo of Mouse functions)
  364.  
  365. Section 3 of Turbo ScrEdit Tutor Describes this portion of code
  366.  
  367. *****************************/
  368.  
  369. void Set_Button_Labels()
  370. {
  371. if  (S_MsLeftPressed) strcpy(Mouse_Demo_buf.Lb,"*Pressed*");
  372. else if  (S_MsLeftReleased) strcpy(Mouse_Demo_buf.Lb,"*Released*");
  373.      else Mouse_Demo_buf.Lb[0]=0;
  374.  
  375. if  (S_MsMiddlePressed)  strcpy(Mouse_Demo_buf.Mb,"*Pressed*");
  376. else if  (S_MsMiddleReleased) strcpy(Mouse_Demo_buf.Mb,"*Released*");
  377.      else Mouse_Demo_buf.Mb[0]=0;
  378.  
  379. if  (S_MsRightPressed)  strcpy(Mouse_Demo_buf.Rb,"*Pressed*");
  380. else if  (S_MsRightReleased) strcpy(Mouse_Demo_buf.Rb,"*Released*");
  381.      else Mouse_Demo_buf.Rb[0]=0;
  382.  
  383. }
  384.  
  385.  
  386. void Set_Event_Mask()
  387. {
  388. if  ((S_MsLeftPressed)&&(S_MsRow==2)&&((S_MsCol>2)&&(S_MsCol<19)))
  389.  {
  390.  if (Mouse_Demo_buf.EM[0]=='1')
  391.    {
  392.    Mouse_Demo_buf.EM[0]='0';
  393.    S_ChangeFieldColor(0,2,0,7);
  394.    }
  395.  else
  396.    {
  397.    Mouse_Demo_buf.EM[0]='1';
  398.    S_ChangeFieldColor(0,2,7,0);
  399.    }
  400.  }
  401.  
  402.  
  403.  
  404. if  ((S_MsLeftPressed)&&(S_MsRow==2)&&((S_MsCol>20)&&(S_MsCol<40)))
  405.  {
  406.  strcpy(S_ErrorMsg,"The Left Mouse Button must remain enabled for this demo..");
  407.  }
  408. if  ((S_MsLeftPressed)&&(S_MsRow==3)&&((S_MsCol>20)&&(S_MsCol<40)))
  409.  {
  410.  if (Mouse_Demo_buf.EM[2]=='1')
  411.    {
  412.    Mouse_Demo_buf.EM[2]='0';
  413.    S_ChangeFieldColor(5,2,0,7);
  414.    }
  415.  else
  416.    {
  417.    Mouse_Demo_buf.EM[2]='1';
  418.    S_ChangeFieldColor(5,2,7,0);
  419.    }
  420.  }
  421.  
  422.  
  423. if  ((S_MsLeftPressed)&&(S_MsRow==2)&&((S_MsCol>59)&&(S_MsCol<80)))
  424.  {
  425.  if (Mouse_Demo_buf.EM[3]=='1')
  426.    {
  427.    Mouse_Demo_buf.EM[3]='0';
  428.    S_ChangeFieldColor(3,2,0,7);
  429.    }
  430.  else
  431.    {
  432.    Mouse_Demo_buf.EM[3]='1';
  433.    S_ChangeFieldColor(3,2,7,0);
  434.    }
  435.  }
  436.  
  437. if  ((S_MsLeftPressed)&&(S_MsRow==3)&&((S_MsCol>59)&&(S_MsCol<80)))
  438.  {
  439.  if (Mouse_Demo_buf.EM[4]=='1')
  440.    {
  441.    Mouse_Demo_buf.EM[4]='0';
  442.    S_ChangeFieldColor(7,2,0,7);
  443.    }
  444.  else
  445.    {
  446.    Mouse_Demo_buf.EM[4]='1';
  447.    S_ChangeFieldColor(7,2,7,0);
  448.    }
  449.  }
  450.  
  451.  
  452.  
  453. if  ((S_MsLeftPressed)&&(S_MsRow==2)&&((S_MsCol>40)&&(S_MsCol<59)))
  454.  {
  455.  if (Mouse_Demo_buf.EM[5]=='1')
  456.    {
  457.    Mouse_Demo_buf.EM[5]='0';
  458.    S_ChangeFieldColor(2,2,0,7);
  459.    }
  460.  else
  461.    {
  462.    Mouse_Demo_buf.EM[5]='1';
  463.    S_ChangeFieldColor(2,2,7,0);
  464.    }
  465.  }
  466. if  ((S_MsLeftPressed)&&(S_MsRow==3)&&((S_MsCol>40)&&(S_MsCol<59)))
  467.  {
  468.  if (Mouse_Demo_buf.EM[6]=='1')
  469.    {
  470.    Mouse_Demo_buf.EM[6]='0';
  471.    S_ChangeFieldColor(6,2,0,7);
  472.    }
  473.  else
  474.    {
  475.    Mouse_Demo_buf.EM[6]='1';
  476.    S_ChangeFieldColor(6,2,7,0);
  477.    }
  478.  }
  479. }
  480.  
  481.  
  482.  
  483. void Change_Mode()
  484. {
  485. if  ((S_MsLeftPressed)&&(S_MsRow==7)&&((S_MsCol>1)&&(S_MsCol<5)))
  486.   {
  487.   Tr=6;
  488.   Tc=30;
  489.   Br=17;
  490.   Bc=52;
  491.   S_SetMouseRange(Tc,Tr,Bc,Br);
  492.   S_MsRow = 11;
  493.   S_MsCol = 41;
  494.   S_MoveMouse();
  495.   }
  496. if  ((S_MsLeftPressed)&&(S_MsRow==9)&&((S_MsCol>1)&&(S_MsCol<5)))
  497.   {
  498.   Tr=6;
  499.   Tc=58;
  500.   Br=17;
  501.   Bc=79;
  502.   S_SetMouseRange(Tc,Tr,Bc,Br);
  503.   S_MsRow = 11;
  504.   S_MsCol = 68;
  505.   S_MoveMouse();
  506.   }
  507. if  ((S_MsLeftPressed)&&(S_MsRow==5)&&((S_MsCol>1)&&(S_MsCol<5)))
  508.   {
  509.   S_ChangeFieldColor(4,2,2,0);
  510.   strcpy(Mouse_Demo_buf.End_Set_Up,"** FINISHED **");
  511.   Tr=2;
  512.   Tc=3;
  513.   Br=3;
  514.   Bc=79;
  515.   S_SetMouseRange(Tc,Tr,Bc,Br);
  516.   S_MsRow = 3;
  517.   S_MsCol = 8;
  518.   S_MoveMouse();
  519.   }
  520. }
  521.  
  522.  
  523.  
  524.  
  525.  
  526. void MouseDemo()
  527. {
  528. S_ActivateMouse();
  529.  
  530. S_SetMouseEvent(Mouse_Demo_buf.EM);
  531. Tr=5;
  532. Tc=1;
  533. Br=18;
  534. Bc=29;
  535. S_SetMouseRange(Tc,Tr,Bc,Br);
  536. S_MsRow = 5;
  537. S_MsCol = 1;
  538. S_ShowMouse();
  539. do
  540.  {
  541.  Mouse_Demo_buf.Cr=(double)S_MsRow;
  542.  Mouse_Demo_buf.Cc=(double)S_MsCol;
  543.  Mouse_Demo_buf.Ur=(double)Tr;
  544.  Mouse_Demo_buf.Uc=(double)Tc;
  545.  Mouse_Demo_buf.Lr=(double)Br;
  546.  Mouse_Demo_buf.Lc=(double)Bc;
  547.  
  548.  S_ResetMouseFlags();
  549.  
  550.  S_ReadKey();
  551.  
  552.  if  (S_Ms->MouseEvent)
  553.      S_AnalizeMouse();
  554.  
  555.  Set_Button_Labels();
  556.  
  557.  if (((S_MsLeftPressed)&&(S_MsRow==11)&&((S_MsCol>35)&&(S_MsCol<48)))||
  558.      ((S_MsLeftPressed)&&(S_MsRow==11)&&((S_MsCol>62)&&(S_MsCol<75)))||
  559.      ((S_MsLeftPressed)&&(S_MsRow==3) &&((S_MsCol>2) &&(S_MsCol<17))))
  560.    {
  561.    S_SetMouseRange(1,5,28,18);
  562.    if (S_MsRow==3)
  563.      {
  564.      S_ChangeFieldColor(4,2,0,4);
  565.      Mouse_Demo_buf.End_Set_Up[0]=0;
  566.      S_SetMouseEvent(Mouse_Demo_buf.EM);
  567.      S_MsRow = 5;
  568.      S_MsCol = 3;
  569.      S_MoveMouse();
  570.      }
  571.    else
  572.      if  (S_MsCol > 62)
  573.        {
  574.        S_MsRow=9;
  575.        S_MsCol=3;
  576.        S_MoveMouse();
  577.        }
  578.      else
  579.        {
  580.        S_MsRow=7;
  581.        S_MsCol=3;
  582.        S_MoveMouse();
  583.        }
  584.    }
  585.  else
  586.    {
  587.    switch (S_MsRow)
  588.     {
  589.     case 2:
  590.     case 3: {Set_Event_Mask();break;}
  591.     case 5:
  592.     case 7:
  593.     case 9: {Change_Mode();break;}
  594.     }
  595.    }
  596.  }
  597. while (!((S_MsLeftPressed)&&(S_MsRow==11)&&((S_MsCol>1)&&(S_MsCol<5))));
  598. S_ResetMouseFlags();
  599. S_HideMouse();
  600. S_DisableMouse();
  601. }
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612. /*****************************
  613.  
  614. MENU OPTION 3  (Customizing Screen Colors)
  615.  
  616. Section 4 of Turbo ScrEdit Tutor Describes this portion of code
  617.  
  618. *****************************/
  619.  
  620. void ChangeColors()
  621. {
  622. int X,Y;
  623. Color_Demo_buf.F1=2.0;
  624. Color_Demo_buf.A =0.0;
  625. Color_Demo_buf.F2=0.0;
  626. Color_Demo_buf.B =5.0;
  627. Color_Demo_buf.F3=15.0;
  628. Color_Demo_buf.C =0.0;
  629. Color_Demo_buf.F4=14.0;
  630. Color_Demo_buf.D =0.0;
  631. Color_Demo_buf.F5=3.0;
  632. Color_Demo_buf.E =0;
  633. Color_Demo_buf.F6=2.0;
  634. Color_Demo_buf.F =0.0;
  635. Color_Demo_buf.F7=2.0;
  636. Color_Demo_buf.G =0.0;
  637. Color_Demo_buf.F8=15.0;
  638. Color_Demo_buf.H =0.0;
  639. Color_Demo_buf.F9=2.0;
  640. Color_Demo_buf.I =0.0;
  641.  
  642. while (!S_Esc)
  643.   {
  644.  
  645.   S_ReadScreen();
  646.  
  647.   /* Text */
  648.   S_ChangeScreenColor(
  649.     0,(int)Color_Demo_buf.A,(int)Color_Demo_buf.F1, 1,24, 1,80);
  650.  
  651.   /* double line around logo */
  652.   S_ChangeScreenColor(
  653.     2,(int)Color_Demo_buf.D,(int)Color_Demo_buf.F4, 1,11, 1,80);
  654.  
  655.   /* Logo */
  656.   S_ChangeScreenColor(
  657.     2,(int)Color_Demo_buf.B,(int)Color_Demo_buf.F2, 2, 9,10,69);
  658.  
  659.   /* Fill in logo letters */
  660.   S_ChangeScreenColor(
  661.     0,(int)Color_Demo_buf.B,(int)Color_Demo_buf.F2, 2, 8,11,11);
  662.   S_ChangeScreenColor(
  663.     0,(int)Color_Demo_buf.B,(int)Color_Demo_buf.F2, 2, 8,18,18);
  664.   S_ChangeScreenColor(
  665.     0,(int)Color_Demo_buf.B,(int)Color_Demo_buf.F2, 5, 8,22,22);
  666.   S_ChangeScreenColor(
  667.     0,(int)Color_Demo_buf.B,(int)Color_Demo_buf.F2, 5, 8,27,27);
  668.   S_ChangeScreenColor(
  669.     0,(int)Color_Demo_buf.B,(int)Color_Demo_buf.F2, 5, 8,31,31);
  670.   S_ChangeScreenColor(
  671.     0,(int)Color_Demo_buf.B,(int)Color_Demo_buf.F2, 7, 8,35,35);
  672.   S_ChangeScreenColor(
  673.     0,(int)Color_Demo_buf.B,(int)Color_Demo_buf.F2, 5, 6,36,36);
  674.   S_ChangeScreenColor(
  675.     0,(int)Color_Demo_buf.B,(int)Color_Demo_buf.F2, 2, 8,40,40);
  676.   S_ChangeScreenColor(
  677.     0,(int)Color_Demo_buf.B,(int)Color_Demo_buf.F2, 3, 3,47,47);
  678.   S_ChangeScreenColor(
  679.     0,(int)Color_Demo_buf.B,(int)Color_Demo_buf.F2, 8, 8,47,47);
  680.   S_ChangeScreenColor(
  681.     0,(int)Color_Demo_buf.B,(int)Color_Demo_buf.F2, 5, 8,51,51);
  682.   S_ChangeScreenColor(
  683.     0,(int)Color_Demo_buf.B,(int)Color_Demo_buf.F2, 2, 8,56,56);
  684.   S_ChangeScreenColor(
  685.     0,(int)Color_Demo_buf.B,(int)Color_Demo_buf.F2, 6, 8,60,60);
  686.   S_ChangeScreenColor(
  687.     0,(int)Color_Demo_buf.B,(int)Color_Demo_buf.F2, 2, 8,64,64);
  688.  
  689.   /* other logo text */
  690.   S_ChangeScreenColor(
  691.     0,(int)Color_Demo_buf.B,(int)Color_Demo_buf.F2, 6, 6, 3, 7);
  692.   S_ChangeScreenColor(
  693.     0,(int)Color_Demo_buf.B,(int)Color_Demo_buf.F2, 2, 2,21,24);
  694.   S_ChangeScreenColor(
  695.     0,(int)Color_Demo_buf.B,(int)Color_Demo_buf.F2, 5, 5,67,78);
  696.   S_ChangeScreenColor(
  697.     0,(int)Color_Demo_buf.B,(int)Color_Demo_buf.F2, 6, 6,69,76);
  698.   S_ChangeScreenColor(
  699.     0,(int)Color_Demo_buf.B,(int)Color_Demo_buf.F2, 7, 7,70,74);
  700.   S_ChangeScreenColor(
  701.     0,(int)Color_Demo_buf.B,(int)Color_Demo_buf.F2, 8, 9,67,79);
  702.  
  703.   /* Copyright Notice */
  704.   S_ChangeScreenColor(
  705.     0,(int)Color_Demo_buf.C,(int)Color_Demo_buf.F3,10,10,27,57);
  706.  
  707.   /* Version Number */
  708.   S_ChangeScreenColor(
  709.     0,(int)Color_Demo_buf.E,(int)Color_Demo_buf.F5, 3, 3,71,75);
  710.  
  711.   /* text in configure box */
  712.   S_ChangeScreenColor(
  713.     0,(int)Color_Demo_buf.G,(int)Color_Demo_buf.F7,13,23,18,64);
  714.  
  715.   /* single line box */
  716.   S_ChangeScreenColor(
  717.     1,(int)Color_Demo_buf.F,(int)Color_Demo_buf.F6,13,24,17,65);
  718.  
  719.   X = 0;
  720.   while (X < 18)
  721.     {
  722.     S_ChangeFieldColor(
  723.       X,1,(int)Color_Demo_buf.H,(int)Color_Demo_buf.F8);
  724.     S_ChangeFieldColor(
  725.       X,2,(int)Color_Demo_buf.I,(int)Color_Demo_buf.F9);
  726.     X++;
  727.     }
  728.  
  729.   S_RefreshScreen();
  730.   }
  731. }
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745. /*****************************
  746.  
  747. MENU OPTION 9 (Mixed ScrEdit)
  748.  
  749. Section 4 of Turbo ScrEdit Tutor Describes this portion of code
  750.  
  751. *****************************/
  752.  
  753. void Back_To_Turbo_C_Land()
  754. {
  755. char Response[11];
  756. Response[0] = 0;
  757.  
  758. textbackground(BLACK);
  759. textcolor     (YELLOW);
  760.  
  761. while (strcmp("RETURN",Response)!= 0)
  762.     {
  763.     clrscr();
  764.     cprintf("This is regular 'C' code now.\r\n\r\n");
  765.     cprintf("You can do anything now that you want to, use any \r\n");
  766.     cprintf("programming statement that you wish to.  When you \r\n");
  767.     cprintf("are ready to resume with Turbo ScrEdit just return \r\n");
  768.     cprintf("and the screen will be reloaded and you will resume \r\n");
  769.     cprintf("at the point where you left the screen.\r\n\r\n");
  770.     cprintf("Type 'RETURN' in upper case to end this example...");
  771.     Response[0]=6;
  772.     cscanf("%s",Response);
  773.     }
  774. textbackground(BLACK);
  775. textcolor     (GREEN);
  776. }
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786. /*****************************
  787.  
  788. START OF MAIN MENU SCREEN PROCEDURES
  789.  
  790. Section 1 of Turbo ScrEdit Tutor Describes this portion of code
  791.  
  792. *****************************/
  793.  
  794. void ProcessScreen()
  795. {
  796. S_ShowStatus = 1;
  797. if  (Screen_Mode==1)
  798.     {
  799.     Cursor_Position = atoi(Demo_Screen_buf.op);
  800.     switch (Cursor_Position){
  801.         case 0 : {S_Point = S_FirstField;break;}
  802.         case 1 : {S_Point = 1 ;break;}
  803.         case 2 : {S_Point = 4 ;break;}
  804.         case 3 : {S_Point = 11;break;}
  805.         case 4 : {S_Point = 8 ;break;}
  806.         }
  807.     }
  808.  
  809. if  (Screen_Mode == 2)
  810.     {
  811.     Cursor_Position = atoi(Demo_Screen_buf.op);
  812.     S_Point ++;
  813.     switch (Cursor_Position){
  814.         case 0 :{S_Point = 0;
  815.                  break;
  816.                 }
  817.         case 1 :{if ((S_Point > 3)|| (S_Point < 1)) S_Point = 1;
  818.                  break;
  819.                 }
  820.         case 2 :{if ((S_Point > 9)||(S_Point < 4)) S_Point = 4;
  821.                  if (S_Point == 8) S_Point = 9;
  822.                  break;
  823.                 }
  824.         case 3 :{if ((S_Point > 12)||(S_Point < 11)) S_Point = 11;
  825.                  break;
  826.                 }
  827.         case 4 :{if ((S_Point > 10)||(S_Point < 8)) S_Point = 8;
  828.                  if (S_Point == 9) S_Point = 10;
  829.                  break;
  830.                 }
  831.         }
  832.     }
  833.  
  834. strcpy(S_UserMsg," <F1>=Initialize  <F2>=Return to Menu ");
  835.  
  836. switch (Screen_Mode){
  837.     case 2 : {S_ReadField()     ;break;}
  838.     case 1 : {S_ReadScreen()    ;break;}
  839.     }
  840.  
  841. if  (S_Fkey)
  842.     {
  843.     if  ((!S_Shift)&&(!S_Ctrl)&&(!S_Alt))
  844.         {
  845.         if  (S_F1)
  846.             {
  847.             Initialize_Demo_Screen_buf();
  848.             S_Point = S_FirstField;
  849.             strcpy(S_UserMsg,"Screen has been initialized.");
  850.             }
  851.         if  (S_F2)
  852.             S_LoadScreen("Demo_Menu");
  853.         }
  854.     }
  855. }
  856.  
  857.  
  858.  
  859.  
  860. void ScrDemo_Init()
  861. {
  862. S_OpenScreenFile("ScrDemo.SCR");
  863. Initialize_Demo_Menu_buf();
  864. Initialize_Demo_Screen_buf();
  865. Initialize_Mouse_Demo_buf();
  866. Option       = 1;
  867. S_Sound      = 1;
  868. S_ErrorSound = 1;
  869. S_ErrorFreq  = 300;
  870. S_ErrorDur   = 100;
  871. S_HelpSound  = 1;
  872. S_HelpFreq  = 400;
  873. S_HelpDur   = 100;
  874. S_UserSound  = 1;
  875. S_UserFreq  = 200;
  876. S_UserDur   = 100;
  877. S_ShowStatus = 1;
  878. S_Cursor     = S_NORMAL;/* other options S_BLOCK, S_OFF */
  879.  
  880. textbackground(BLACK);
  881. textcolor     (GREEN);
  882.  
  883. }
  884.  
  885.  
  886.  
  887. void Read_Menu_Screen()
  888. {
  889. int X,Y,Z;
  890. Option = 1;
  891. S_LoadScreen("Demo_Menu");
  892. do
  893.     {
  894.  
  895.     strcpy(Demo_Menu_buf.O1, "Example Data Entry Screen");
  896.     strcpy(Demo_Menu_buf.O2, "Demo of Mouse functions");
  897.     strcpy(Demo_Menu_buf.O3, "Customizing screen colors.");
  898.     strcpy(Demo_Menu_buf.O4, "Using S_ReadScreen");
  899.     strcpy(Demo_Menu_buf.O5, "Using S_ReadField");
  900.     strcpy(Demo_Menu_buf.O6, "Using S_ReadKey");
  901.     strcpy(Demo_Menu_buf.O7, "Using S_NextKey");
  902.     strcpy(Demo_Menu_buf.O8, "'Pop Up' windows demo");
  903.     strcpy(Demo_Menu_buf.O13,"Mixed ScrEdit");
  904.  
  905.     if  (Option < 1) Option = 9;
  906.     if  (Option > 9) Option = 1;
  907.  
  908.     Demo_Menu_buf.P1[0]  = 0;
  909.     Demo_Menu_buf.P2[0]  = 0;
  910.     Demo_Menu_buf.P3[0]  = 0;
  911.     Demo_Menu_buf.P4[0]  = 0;
  912.     Demo_Menu_buf.P5[0]  = 0;
  913.     Demo_Menu_buf.P6[0]  = 0;
  914.     Demo_Menu_buf.P7[0]  = 0;
  915.     Demo_Menu_buf.P8[0]  = 0;
  916.     Demo_Menu_buf.P13[0] = 0;
  917.  
  918.     switch (Option)
  919.        {
  920.        case 1  : {
  921.            strcpy(Demo_Menu_buf.M1,"This option is a pratical example of a");
  922.            strcpy(Demo_Menu_buf.M2,"data entry screen that demonstrates how");
  923.            strcpy(Demo_Menu_buf.M3,"to use EDIT MASKS, DUPE FIELDS, AUTO");
  924.            strcpy(Demo_Menu_buf.M4,"HELP, AUTO VALIDATE, SOUND ON/OFF,");
  925.            strcpy(Demo_Menu_buf.M5,"CLEAR SCREEN, CLEAR DUPES, and CHANGING");
  926.            strcpy(Demo_Menu_buf.M6,"MESSAGE LINE COLORS.");
  927.            strcpy(Demo_Menu_buf.P1,"==>");
  928.            break;
  929.            }
  930.        case 2  : {
  931.            strcpy(Demo_Menu_buf.M1,"Using the MOUSE interface. This option ");
  932.            strcpy(Demo_Menu_buf.M2,"shows how to set up and use all the ");
  933.            strcpy(Demo_Menu_buf.M3,"features of the MOUSE and MOUSE DRIVER.");
  934.            strcpy(Demo_Menu_buf.M4,"How to monitor for mouse buttons being");
  935.            strcpy(Demo_Menu_buf.M5,"pressed or mouse movement. How to");
  936.            strcpy(Demo_Menu_buf.M6,"define mouse windows, and much more..");
  937.            strcpy(Demo_Menu_buf.P2,"==>");
  938.            break;
  939.            }
  940.        case 3  : {
  941.            strcpy(Demo_Menu_buf.M1,"This option demonstrates how to change");
  942.            strcpy(Demo_Menu_buf.M2,"the color assignments for screens, and");
  943.            strcpy(Demo_Menu_buf.M3,"screen fields 'on the fly.' With these");
  944.            strcpy(Demo_Menu_buf.M4,"procedures you can write routines that");
  945.            strcpy(Demo_Menu_buf.M5,"will make your applications custom-");
  946.            strcpy(Demo_Menu_buf.M6,"zable to the users taste. ");
  947.            strcpy(Demo_Menu_buf.P3,"==>");
  948.            break;
  949.            }
  950.        case 4  : {
  951.            strcpy(Demo_Menu_buf.M1,"This option will demonstrate using more");
  952.            strcpy(Demo_Menu_buf.M2,"complex field validation statements to ");
  953.            strcpy(Demo_Menu_buf.M3,"control data entry into a screen. It ");
  954.            strcpy(Demo_Menu_buf.M4,"demonstartes the user of nearly all the");
  955.            strcpy(Demo_Menu_buf.M5,"field validation statements using with ");
  956.            strcpy(Demo_Menu_buf.M6,"S_READSCREEN.");
  957.            strcpy(Demo_Menu_buf.P4,"==>");
  958.            break;
  959.            }
  960.        case 5  : {
  961.            strcpy(Demo_Menu_buf.M1,"This option is just like option 4 ");
  962.            strcpy(Demo_Menu_buf.M2,"except it uses S_READFIELD to processes");
  963.            strcpy(Demo_Menu_buf.M3,"each field on the screen individualy.");
  964.            strcpy(Demo_Menu_buf.M4,"You will see that it works quite diff-");
  965.            strcpy(Demo_Menu_buf.M5,"erently than the previous example that");
  966.            strcpy(Demo_Menu_buf.M6,"used S_READSCREEN.");
  967.            strcpy(Demo_Menu_buf.P5,"==>");
  968.            break;
  969.            }
  970.        case 6  : {
  971.            strcpy(Demo_Menu_buf.M1,"This option demonstates how a program");
  972.            strcpy(Demo_Menu_buf.M2,"can communicate with the user using the");
  973.            strcpy(Demo_Menu_buf.M3,"message line to display a messsage and");
  974.            strcpy(Demo_Menu_buf.M4,"wait for the user to respond by pressing");
  975.            strcpy(Demo_Menu_buf.M5,"a key. The key pressed is not echoed to");
  976.            strcpy(Demo_Menu_buf.M6,"the screen. See S_READKEY for more info");
  977.            strcpy(Demo_Menu_buf.P6,"==>");
  978.            break;
  979.            }
  980.        case 7  : {
  981.            strcpy(Demo_Menu_buf.M1,"This option demonstrates how S_NEXTKEY");
  982.            strcpy(Demo_Menu_buf.M2,"works. It is similar to S_READKEY");
  983.            strcpy(Demo_Menu_buf.M3,"except no message or screen fields are ");
  984.            strcpy(Demo_Menu_buf.M4,"displayed. Only the next key pressed is");
  985.            strcpy(Demo_Menu_buf.M5,"returned to your program.");
  986.            strcpy(Demo_Menu_buf.P7,"==>");
  987.            break;
  988.            }
  989.        case 8  : {
  990.            strcpy(Demo_Menu_buf.M1,"Demonstrates iHn System's 'POP UP'");
  991.            strcpy(Demo_Menu_buf.M2,"windows package that is included with");
  992.            strcpy(Demo_Menu_buf.M3,"the registered version of Turbo ScrEdit");
  993.            strcpy(Demo_Menu_buf.M4,"");
  994.            strcpy(Demo_Menu_buf.M5,"");
  995.            strcpy(Demo_Menu_buf.M6,"");
  996.            strcpy(Demo_Menu_buf.P8,"==>");
  997.            break;
  998.            }
  999.        case 9 : {
  1000.            strcpy(Demo_Menu_buf.M1,"This demonstrates how you can exit a");
  1001.            strcpy(Demo_Menu_buf.M2,"procedure using a Turbo ScrEdit screen");
  1002.            strcpy(Demo_Menu_buf.M3,"to use your language's standard screen");
  1003.            strcpy(Demo_Menu_buf.M4,"I/O statements such as clrscr, cprint,");
  1004.            strcpy(Demo_Menu_buf.M5,"scanf, ect. To resume right were you");
  1005.            strcpy(Demo_Menu_buf.M6,"left off us S_REFRESHSCREEN and go on.");
  1006.            strcpy(Demo_Menu_buf.P13,"==>");
  1007.            }
  1008.        }
  1009.  
  1010.  
  1011.     S_ResetKeyFlags();
  1012.     while ((!S_Esc)&&(!S_Enter)&&(!S_Fkey))
  1013.         {
  1014.         S_ReadKey();
  1015.         if  ((S_Up)||(S_Down)||(S_Enter)||(S_Esc))
  1016.             {
  1017.             if  (S_Down) Option++;
  1018.             if  (S_Up)   Option--;
  1019.             if  (S_Enter)
  1020.                 {
  1021.                 if  (Option==1)
  1022.                     {
  1023.                     RecordDemo();
  1024.                     S_LoadScreen("Demo_Menu");
  1025.                     }
  1026.                 if  (Option == 2)
  1027.                     {
  1028.                     if  (S_MouseInstalled)
  1029.                       {
  1030.                       S_LoadScreen("Mouse_Demo");
  1031.                       S_ClearScreen(1);
  1032.                       MouseDemo();
  1033.                       S_LoadScreen("Demo_Menu");
  1034.                       }
  1035.                     else
  1036.                       strcpy(S_ErrorMsg," Mouse driver is not loaded into memory ");
  1037.                     }
  1038.                 if  (Option == 3)
  1039.                     {
  1040.                     Initialize_Color_Demo_buf();
  1041.                     S_LoadScreen("Color_Demo");
  1042.                     ChangeColors();
  1043.                     S_LoadScreen("Demo_Menu");
  1044.                     }
  1045.                 if  (Option == 4)
  1046.                     {
  1047.                     Screen_Mode = 1;
  1048.                     Initialize_Demo_Screen_buf();
  1049.                     S_LoadScreen("Demo_Screen");
  1050.                     while (!S_F2) ProcessScreen();
  1051.                     }
  1052.                 if  (Option == 5)
  1053.                     {
  1054.                     Screen_Mode = 2;
  1055.                     Initialize_Demo_Screen_buf();
  1056.                     S_LoadScreen("Demo_Screen");
  1057.                     while (!S_F2) ProcessScreen();
  1058.                     }
  1059.                 if  (Option == 6)
  1060.                     {
  1061.                     strcpy(S_UserMsg,
  1062.                            "Demo of S_READKEY - Press 'C' key to continue");
  1063.                     do{
  1064.                         S_ReadKey();
  1065.                         strcpy(S_UserMsg,
  1066.                                "OOPS!! wrong key - Press 'C' key to continue");
  1067.                       } while ((S_Ch!='C')&&(S_Ch!='c'));
  1068.  
  1069.                     strcpy(S_UserMsg," 'C' has been pressed - You may continue");
  1070.                     }
  1071.                 if  (Option == 7)
  1072.                     {
  1073.                     for (X=1;X<7;X++){
  1074.                         gotoxy(39,14+X);
  1075.                         cprintf("                                         ");}
  1076.                     gotoxy(39,17);
  1077.                     cprintf(" << OKAY PRESS A SHIFT C to CONTINUE >>");
  1078.                     do{
  1079.                        S_NextKey();
  1080.                        S_Ch = toupper(S_Ch);
  1081.                       } while (!((S_Shift)&&(S_Ch=='C')));
  1082.                     }
  1083.                 if  (Option == 8)
  1084.                     {
  1085.  
  1086.                     Result = spawnl(P_WAIT,"DemoWind.exe","0",NULL);
  1087.                     if (Result == -1)
  1088.                        {
  1089.                        switch (errno)
  1090.                          {
  1091.                          case ENOENT:
  1092.                            {
  1093.                            strcpy(S_UserMsg," 'DemoWind.Exe' not found! ");
  1094.                            break;
  1095.                            }
  1096.                          case ENOMEM:
  1097.                            {
  1098.                            strcpy(S_UserMsg," Not enough memeory to run windows demo. ");
  1099.                            break;
  1100.                            }
  1101.                          }
  1102.                        }
  1103.                     else
  1104.                       strcpy(S_UserMsg," End of Windows Demo ");
  1105.                     }
  1106.                 if  (Option == 9)
  1107.                     {
  1108.                     Back_To_Turbo_C_Land();
  1109.                     S_RefreshScreen();
  1110.                     }
  1111.                 S_ShowStatus = 1;
  1112.                 S_ResetKeyFlags();
  1113.                 }
  1114.             }
  1115.         else
  1116.           strcpy(S_UserMsg," Only UP and DOWN arrows and ENTER and ESC are valid");
  1117.         }
  1118.     }
  1119. while (!S_Esc);
  1120.  
  1121. }
  1122.  
  1123. /*****************************
  1124.  
  1125. PROGRAM BEGINS HERE
  1126.  
  1127. *****************************/
  1128.  
  1129. void main()
  1130. {
  1131. ScrDemo_Init();
  1132. while (!S_Esc) Read_Menu_Screen();
  1133. S_CloseScreenFile();
  1134. gotoxy(1,24);
  1135. }
  1136.